//
//  LoadingTableViewEmptyView.m
//  megawave
//
//  Created by houzhen on 2016/11/11.
//  Copyright © 2016年 multway. All rights reserved.
//

#import "LoadingTableViewEmptyView.h"

@implementation LoadingTableViewEmptyView

-(LoadingTableViewEmptyView*)initWithLebel:(NSString*)label delegate:(id)delegate{
    self = [super init];
    if (self) {
        self = [[[NSBundle mainBundle] loadNibNamed:@"LoadingTableViewEmptyView" owner:self options:nil] firstObject];
    }
    
    UITapGestureRecognizer*tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
    
    [self addGestureRecognizer:tapGesture];
    [self.emptyTextLabel setText:label];
    
    self.delegate = delegate;
    
    return self;
}

-(void)tap:(id)sender{
    [self.delegate reloadMyData];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
